package com.xrui.hbaseview.ui.controls.format;

import javax.swing.text.Element;
import javax.swing.text.View;
import javax.swing.text.ViewFactory;

public class FormatViewFactory implements ViewFactory {

    private TextFormatter formatter;

    public FormatViewFactory(TextFormatter formatter) {
        this.formatter = formatter;
    }

    /**
     * @see ViewFactory#create(Element)
     */
    @Override
    public View create(Element elem) {
        return new FormatView(formatter, elem);
    }
}
